﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyOA.DAL;
using MyOA.Model;

namespace MyOA.BLL
{
    public class BranchInfoManager
    {
        BranchInfoService branchInfoService = new BranchInfoService();
        //查找所有BranchInfo信息
        public IList<BranchInfo> GetAllBranchInfo()
        {
            return branchInfoService.GetAllBranchInfo();
        }
        //根据BranchId查找BranchInfo
        public BranchInfo GetBranchInfoByBranchId(int branchId)
        {
            return branchInfoService.GetBranchInfoByBranchId(branchId);
        }
        //根据BranchName查找BranchInfo
        public BranchInfo GetBranchInfoByBranchName(string brabchName)
        {
            return branchInfoService.GetBranchInfoByBranchName(brabchName);
        }
        //添加BranchInfo信息
        public int AddBranchInfo(BranchInfo branchInfo)
        {
            return branchInfoService.AddBranchInfo(branchInfo);
        }
        //修改BranchInfo信息
        public int UpdateBranchInfoByBranchId(BranchInfo branchInfo)
        {
            return branchInfoService.UpdateBranchInfoByBranchId(branchInfo);
        }
        //删除BranchInfo信息
        public int DeleteBranchInfoByBranchId(int branchId)
        {
            return branchInfoService.DeleteBranchInfoByBranchId(branchId);
        }

        /// <summary>
        /// 查询部门信息
        /// </summary>
        /// <returns></returns>
        public IList<BranchInfo> GetBranchName()
        {
            return branchInfoService.GetBranchName();
        }
    }
}
